<?php
###############   COPYLEFT GPLv3 LICENSE   ###############
##
## JFX Version 0.2.7
## Website Management Software
## www.jfxcms.com
##
## Copyright 2009 GPLv3 - http://www.opensource.org/licenses/gpl-3.0.html
##
## Anthony Gallon
## oi_antz@hotmail.com
##
## Permission is hereby granted to any person having a copy of this software
## to freely use and modify as required so long as the copyright notices
## and branding remain intact.
##
## Full license details available at http://www.jfxcms.com/license
##
###############   COPYLEFT GPLv3 LICENSE   ###############


try{


define('JFX_EXEC_FILE', __FILE__);


// the framework setup
require_once('jfx-private/jfx-system-start.php');


$JFXMemDebug[] = array('bytes'=>memory_get_usage(), 'file'=>__FILE__, 'line'=>__LINE__, 'time' => getmicrotime(), 'desc' => 'Return to index file after system-start');

$CORE->dispatch();

$JFXMemDebug[] = array('bytes'=>memory_get_usage(), 'file'=>__FILE__, 'line'=>__LINE__, 'time' => getmicrotime(), 'desc' => 'After $CORE->dispatch()');


// renders our output through the template
require_once('jfx-private/jfx-system-end.php');

} catch ( Exception $e){
    $filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'exceptions-log.txt';
    $fh = fopen($filename, 'a+');
    fwrite($fh, date('H:ia d M Y')."\n".$e->getMessage()."\n".THIS_PAGE_URL."\n".$e->getTraceAsString()."\n\n");
    fclose($fh);
}
